package com.haydn.practice.restfulweb.service;

import com.haydn.practice.restfulweb.dao.LoginDao;
import com.haydn.practice.restfulweb.entity.User;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @Author haydn
 * @create 2020/9/3 8:30
 *
 *
 * 为springSecurity新创建的service层类
 */
public class LoginService {

    private final LoginDao loginDao;

    @Autowired
    public LoginService(LoginDao loginDao) {
        this.loginDao = loginDao;
    }

    public List<User> getUserByUsername(String username) {
        return loginDao.getUserByUsername(username);
    }

}
